package socket;


import java.io.IOException;
import java.io.InputStreamReader;
import java.net.*;
/**
 * 
 * @author pfister@lgi2p 07/11/28
 *
 */
public class BaseClient implements Protocol{

	protected int id;
	protected Socket socket;
	protected String name;
	protected boolean stop;
	protected InputStreamReader inp;
	
	public BaseClient(int id,Socket s, String name) {
		this.id = id;
		this.socket = s;
		this.name = name;
	}

		
	public Socket getSocket() {
		return socket;
	}

	public String getName() {
		return name;
	}


	public synchronized void log(String mesg) {
	//	System.out.println("("+id+")"+mesg);
		System.out.println(mesg);
	}


	public synchronized boolean parseProtocol(String mesg) {
		return false;
	}


	public synchronized void stop() throws IOException {
		log(REMOVE);
		stop = true;
		inp.close();	
	}


}
